package com.jade.explorer.dirscan;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Project extends TreeParent {
	
	//------------------------------Private fields
	private String _name = "";
	private String _comment = "";
	private String _author = "";
	private String _company = "";
	private String _dateCreate = "";
	private String _dateChange = "";
	
	
	//------------------------------Private methods
	private String getCurrentDate(){
		Date dNow = new Date( );
		SimpleDateFormat ft = new SimpleDateFormat ("dd.MM.yyyy, HH:mm:ss");
		return ft.format(dNow);
	}
	
	//------------------------------Constructors
	public Project(String name, String path) {
		super(name, path);
		super.setType(FileType.PROJECT);
	}
	
	
	//------------------------------Public methods
	public String getProjectName(){
		return _name;
	}
	
	public void setProjectName(String name){
		_name = name;
	}
	
	public String getComment(){
		return _comment;
	}
	
	public void setComment(String comment){
		_comment = comment;
	}
	
	public String getAuthor(){
		return _author;
	}
	
	public void setAuthor(String author){
		_author = author;
	}
	
	public String getCompany(){
		return _company;
	}
	
	public void setCompany(String company){
		_company = company;
	}
	
	public String getCreateDate(){
		return _dateCreate;
	}
	
	public void setCreateDate(String dateCreate){
		_dateCreate = dateCreate;
	}
	
	public String getChangeDate(){
		return _dateChange;
	}
	
	public void setChangeDate(String dateChange){
		_dateChange = dateChange;
	}
	
	public void setChangeDateCurrent(){
		_dateChange = getCurrentDate();
	}
	
	public void setCreateDateCurrent(){
		_dateCreate = getCurrentDate();
	}
}
